<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page language= "java" contentType="text/html;charset=UTF-8"%> 
    <div id="links">
        <a id="link-add-cost" href="#">记支出</a>
    </div>
    <p/>
        
    <div class="ui-widget">
    <table class="ui-widget ui-widget-content">
       <thead>
           <tr class="ui-widget-header ">
               <th>id</th><th>日期</th><th>支出类型</th><th>支出账户</th><th>金额</th><th>注释</th><th>操作</th>
           </tr>
       </thead>
       <tbody id="item-table-body">
       <s:if test="costs.size > 0">
           <s:iterator value="costs">
           <tr>
             <td><s:property value="id"/></td>
             <td><s:date name="costDate" format="yyyy/MM/dd" /></td>

             <td>
             <s:if test="costType.parent != null">
             <s:property value="costType.parent.name"/>&nbsp;->&nbsp;
             </s:if>
             <s:property value="costType.name"/>
             </td>

             <td>
             <s:if test="assetType.parent != null">
             <s:property value="assetType.parent.name"/>&nbsp;->&nbsp;
             </s:if>
             <s:property value="assetType.name"/>
             </td>

             <td><s:property value="amount"/></td>
             <td><s:property value="comment"/></td>

             <td><a id="delete-cost-<s:property value='id'/>" href="#" >删除</button></td>

           </tr>
       </s:iterator>
       </s:if>
       </tbody>
       </table>
   </div>
 <jsp:include page="AddCost.jsp"/>




